"""init new crawl data tables

Revision ID: 99a474eff885
Revises:
Create Date: 2016-08-27 00:53:00.967064

"""

# revision identifiers, used by Alembic.
revision = '99a474eff885'
down_revision = None
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table(
        'articles',
        sa.Column('title', sa.String(100)),
        sa.Column('content', sa.Text(15000)),
        sa.Column('images', sa.String(100)),
        sa.Column('fromsrc', sa.String(100)),
        sa.PrimaryKeyConstraint('fromsrc'),
        mysql_DEFAULT_CHARSET='utf8mb4',
        mysql_COLLATE='utf8mb4_general_ci'
    )


def downgrade():
    op.drop_table('articles')
